<?php


namespace app\index\validate;


use think\Validate;

class Order extends Validate
{
    protected $rule = [
        ['id','require|number','id不能为空|id必须为数字'],
        ['order_id','require|number','id不能为空|id必须为数字'],
        ['customer_name','require','客户名称不能为空'],
        ['email','require','邮箱不能为空'],
        ['country','require','国家不能为空'],
        ['city','require','城市不能为空'],
        ['address','require','地址不能为空'],
        ['zip_code','require','邮编不能为空'],
        ['phone','require','电话不能为空'],
        ['amount','require|number','付款不能为空|付款金额必须为数字'],
        ['method','require','付款方式不能为空'],
        ['payment_date','require','付款日期不能为空'],
    ];

    protected $scene = [
        'customer_order'  =>  ['customer_name','email'],
        'order_pay'  =>  ['order_id','amount','method','payment_date'],
        'order_pay_byCardId'  =>  ['order_id','amount','method','payment_date'],
    ];
}